package com.hkjtgc.pcr_app.model


import androidx.room.ColumnInfo
import androidx.room.Entity
import androidx.room.PrimaryKey

@Entity(tableName = "todo")
data class TodoInfoDO constructor(

    @PrimaryKey(autoGenerate = true)
    var id: Int? = null,

    @ColumnInfo(name = "operator_name")
    val operatorName: String?,//操作人姓名

    @ColumnInfo(name = "create_date")
    val createDate: String?,//创建时间

    @ColumnInfo(name = "simple_type")
    val simpleType: String?,//样品管类型

    @ColumnInfo(name = "simple_name")
    val simpleName: String?, //样品管名

    @ColumnInfo(name = "card_box_type")
    val cardBoxType: String?,//卡盒类型

    @ColumnInfo(name = "card_box_name")
    val cardBoxName: String?,//卡盒名

    @ColumnInfo(name = "profile_name")
    val profileName: String?,//受测人姓名

    @ColumnInfo(name = "profile_sex")
    val profileSex: String?, //受测人性别

){
    companion object {
        private const val ROLE_TYPE_INSTITUTION_COMMON = 11
        private const val ROLE_TYPE_INSTITUTION_ADMIN = 10
        private const val ROLE_TYPE_TECH = 2
        private const val ROLE_TYPE_ADMIN = 1
        private const val ROLE_TYPE_SUPER = 0
        private val ROLE_TYPE_NAME: HashMap<Int, String> = HashMap()

        init {
            //外部用户
            ROLE_TYPE_NAME[ROLE_TYPE_INSTITUTION_COMMON] = "机构普通用户"
            ROLE_TYPE_NAME[ROLE_TYPE_INSTITUTION_ADMIN] = "机构管理员"
            //内部用户
            ROLE_TYPE_NAME[ROLE_TYPE_TECH] = "技术人员" //只负责对实验环节的定制
            ROLE_TYPE_NAME[ROLE_TYPE_ADMIN] = "管理员" //包括出入库管理
            ROLE_TYPE_NAME[ROLE_TYPE_SUPER] = "系统运维人员"
        }
    }
}